<div class="standard left large">
<?php

	# for FDs this will be set to "READONLY"
	$readonlyflag = $this->readonlyfields;
	
	$case = $this->caseInfo;
	$home = $this->home;
 	$choice = $case['choice'];
	$tribute = $case['tribute_chosen'];
	
	$casket = $case['casket'];
	$urn = $case['urn'];
	$vault = $case['vault'];
	
	// casket/urn and vault price?
	
	$caterer_name = $case['caterer'];
	$menu_and_cost = $case['menu'];
	if(!empty($menu_and_cost))
	{
		list($menu, $menu_price) = explode(':', $menu_and_cost);
	}

	# compute these...
	$veteran_is_selected = $case['decedent_is_veteran']==1?"CHECKED":"";	
	$decedent_lived_in_city_selected = $case['decedent_lived_in_city']==1?"CHECKED":"";
	$decedent_had_policy_selected = $case['had_policy']==1?"CHECKED":"";
	$decedent_honorable_discharge_selected = $case['honorable_discharge']==1?"CHECKED":"";
	$decedent_papers_available_selected = $case['discharge_papers_avail']==1?"CHECKED":"";
	
	$policy_with = $case['policy_with'];
	
	// now get menu description

	$headcount = $case['headcount'];
	$catering_total = $case['catering_total'];
	if(empty($catering_total)) $catering_total = 0.0;
	$catering_notes = $case['catering_notes'];
	
	$florist_name = $case['florist'];
	$arrangements_xml_str = $case['arrangement'];
	$arrangements = array();
	if(!empty($arrangements_xml_str))
	{
		$arrangements_xml = simplexml_load_string( $arrangements_xml_str );
		foreach($arrangements_xml->collection as $collection)
		{
			$arrangement = array();
			$arrangement['name'] = "".$collection->name;
			$arrangement['price'] = "".$collection->price;
			$arrangements[] = $arrangement;
		}
	}	
	
	$floral_total = $case['floral_total'];
	if(empty($floral_total)) $floral_total = 0.0;
	$floral_notes = $case['floral_notes'];
	
	$fdms_case_num = $case['FDMS_case_num'];
	$case_status = $case['FDMS_case_status'];
	$preneed_status = $case['case_preneed_status'];
	$sale_type = $case['sale_type'];
	$service_type = $case['service_type'];	
	$vitals_id = $case['FDMS_vitals_id'];
	
	$service_date = $case['service_date'];
	list($service_y,$service_m,$service_d) = explode("-", $service_date);
	
	$service_time = $case['service_time'];
	list($service_hh, $service_mm, $rest) = explode(":", $service_time);
	
	$decedent_dob = $case['decedent_dob'];
	list($dob_y,$dob_m,$dob_d) = explode("-", $decedent_dob);
	
	$decedent_dod = $case['decedent_dod'];					
	list($dod_y,$dod_m,$dod_d) = explode("-", $decedent_dod);
	
	$decedent_fname = $case['decedent_fname'];
	$decedent_mname = $case['decedent_mname'];
	$decedent_lname = $case['decedent_lname'];
	$decedent_fullname = $decedent_fname;
	$decedent_fullname .= " $decedent_mname";
	$decedent_fullname .= " $decedent_lname";
	
	$decedent_race = $case['decedent_race'];
	$decedent_sex = $case['decedent_sex'];
	
	$decedent_birth_city = $case['decedent_birth_city'];
	$decedent_birth_state = $case['decedent_birth_state'];
	$decedent_birth_country = $case['decedent_birth_country'];
	$decedent_death_city = $case['decedent_death_city'];
	$decedent_death_state = $case['decedent_death_state'];
	$decedent_death_country = $case['decedent_death_country'];
	$decedent_death_location = $case['death_location'];
	$decedent_death_location_address = $case['death_location_address'];
	$decedent_death_location_name = $case['death_location_name'];
	$decedent_primary_education = $case['decedent_primary_education'];
	$decedent_secondary_education = $case['decedent_secondary_education'];
	$decedent_occupation = $case['decedent_occupation'];
	$decedent_business = $case['decedent_business'];
	$decedent_company_name = $case['decedent_company_name'];
	$decedent_marital_status = $case['decedent_marital_status'];
	$decedent_surv_spouse = $case['decedent_surv_spouse'];
	$decedent_lived_in_city = $case['decedent_lived_in_city'];
	$decedent_wife_maiden_name = $case['decedent_wife_maiden_name'];
	$decedent_county_residence_length = $case['decedent_county_residence_length'];
	$decedent_fathers_full_name = $case['decedent_fathers_full_name'];
	$decedent_mothers_maiden_name = $case['decedent_mothers_maiden_name'];
	$decedent_is_veteran = $case['decedent_is_veteran'];
	$branch_of_service = $case['branch_of_service'];
	$date_enlisted = $case['date_enlisted'];
	$date_discharged = $case['date_discharged'];
	$honorable_discharge = $case['honorable_discharge'];
	$military_serial_num = $case['military_serial_num'];
	$dischage_papers_avail = $case['dischage_papers_avail'];
	$had_policy = $case['had_policy'];
	$policy_with = $case['policy_with'];

	$decedent_city = $case['decedent_city'];
	$decedent_state = $case['decedent_state'];				
	$decedent_citystate = "$decedent_city, $decedent_state";
	
	$contact_fname = $case['contact_fname'];
	$contact_mname = $case['contact_mname'];
	$contact_lname = $case['contact_lname'];
	$contact_fullname = $contact_fname;
	$contact_fullname .= " $contact_mname";
	$contact_fullname .= " $contact_lname";
	
	$contact_address = $case['contact_address'];
	$contact_city = $case['contact_city'];
	$contact_state = $case['contact_state'];
	$contact_zip = $case['contact_zip'];
	$contact_citystatezip = "$contact_city, $contact_state $contact_zip";
	
	$contact_phone = $case['contact_phone'];
	$contact_email = $case['contact_email'];
	
	$secondary_contact_fullname = $case['secondary_contact_name'];
	$secondary_contact_address = $case['secondary_contact_address'];
	$secondary_contact_city = $case['secondary_contact_city'];
	$secondary_contact_state = $case['secondary_contact_state'];
	$secondary_contact_zip = $case['secondary_contact_zip'];
	$secondary_contact_citystatezip = "$secondary_contact_city, $secondary_contact_state $secondary_contact_zip";
	
	$secondary_contact_phone = $case['secondary_contact_phone'];
	$secondary_contact_email = $case['secondary_contact_email'];

# NOTE - we have $case['service_loc'], but no idea where it is.
	
	$cemetery_name = $case['cemetery_name'];
	$cemetery_address = $case['cemetery_address'];
	$cemetery_city = $case['cemetery_city'];
	$cemetery_state = $case['cemetery_state'];
	$cemetery_zip = $case['cemetery_zip'];
	$cemetery_citystatezip = "$cemetery_city, $cemetery_state $cemetery_zip";
	
	$crematory_name = $case['crematory_name'];
	$crematory_street = $case['crematory_street'];
	$crematory_city = $case['crematory_city'];
	$crematory_state = $case['crematory_state'];
	$crematory_zip = $case['crematory_zip'];
	$crematory_citystatezip = "$crematory_city, $crematory_state $crematory_zip";

	$church = $case['church'];
	$church_street = $case['church_street'];
	$church_citystatezip = $case['church_citystatezip'];
	
	$addnl_svc = $case['addnl_svc'];
	$addnl_svc_date = $case['addnl_svc_date'];
	$addnl_svc_time = $case['addnl_svc_time'];
	
	$addnl_svc_place = $case['addnl_svc_place'];
	$addnl_svc_street = $case['addnl_svc_street'];
	$addnl_svc_city = $case['addnl_svc_city'];
	$addnl_svc_state = $case['addnl_svc_state'];
	$addnl_svc_citystate = "$addnl_svc_city, $addnl_svc_state";
	
    $fdms_funeral_dir_name = $this->caseFDinfo['full_name'];
    $fdms_funeral_home_name = $home['name'];
    $fdms_funeral_home_address = $home['addr1'];
    $fdms_funeral_home_city_state_zip = $home['city'].", ".$home['state']." ".$home['zip'];
 ?>
<div class="standard"> 

<div style="width:100%;text-align:center">
	<div style="float:left;padding-right:20px">Contract #:<br><strong><?php echo  $fdms_case_num ?></strong></div>
	<div style="float:left;padding-right:20px">Vitals ID:<br><strong><?php echo  $vitals_id ?></strong></div>
	<div style="float:left;padding-right:20px">Sale Type:<br><strong><?php echo  $sale_type ?></strong></div>
	<div style="float:left;padding-right:20px">Service Type:<br><strong><?php echo  $service_type ?></strong></div>
</div>
<br clear="all">

<?php
if($this->editable)
{
	$action =  $this->url( array('controller'=>'index', 'action'=>'reviewcase') );
	echo "<form method=\"POST\" action=\"$action\">";
}
 ?>
 <input type=hidden name="FDMS_case_num" value="<?php echo $fdms_case_num ?>">
<div style="vertical-align:top">
<div style="text-align:center;padding-top:10px;padding-bottom:10px;font-weight:bold">Decedent Information</div>

		<div style="float:left;padding-right:10px">
		First Name:<br>
		<input  <?php echo $readonlyflag?> type="text" name="decedent_fname" value="<?php echo $decedent_fname?>">
		</div>
		<div style="float:left;padding-right:10px">
		Middle Name:<br>
		<input <?php echo $readonlyflag?> type="text" name="decedent_mname" value="<?php echo $decedent_mname?>">
		</div>
		<div style="float:left;padding-right:10px">
		Last Name:<br>
		<input <?php echo $readonlyflag?> type="text" name="decedent_lname" value="<?php echo $decedent_lname?>">
		</div>
		
		<br clear="all">
		
		<div style="float:left;padding-right:10px">
		City:<br>
		<input <?php echo $readonlyflag?> type="text" name="decedent_city" value="<?php echo $decedent_city?>">
		</div>
		<div style="float:left;padding-right:10px">
		State:<br>
		<input <?php echo $readonlyflag?> type="text" size="2" name="decedent_state" value="<?php echo $decedent_state?>">
		</div>
		
		<div style="float:left;padding-right:10px">
		Length of Residence in County:<br>
		<input <?php echo $readonlyflag?> type="text" size="8" name="decedent_county_residence" value="<?php echo $decedent_county_residence_length?>">
		<input <?php echo $readonlyflag?> type="checkbox" name="decedent_lived_in_city" <?php echo $decedent_lived_in_city_selected?>> Decedent lived in city<br>
		</div>
		
		<br clear="all">

		<div style="float:left;padding-right:10px">
		Race:<br>
		<input <?php echo $readonlyflag?> type="text" size="16" name="decedent_race" value="<?php echo $decedent_race?>">
		</div>
		
		<div style="float:left;padding-right:10px">
		Sex:<br>
		<input <?php echo $readonlyflag?> type="text" size="8" name="decedent_sex" value="<?php echo $decedent_sex?>">
		</div>
		
		<br clear="all">
				
		<div style="float:left;padding-right:10px">
		Marital Status:<br>
		<input <?php echo $readonlyflag?> type="text" size="8" name="decedent_marital_status" value="<?php echo $decedent_marital_status?>">
		</div>
		
		<div style="float:left;padding-right:10px">
		Surviving Spouse:<br>
		<input <?php echo $readonlyflag?> type="text" size="32" name="decedent_surv_spouse" value="<?php echo $decedent_surv_spouse?>">
		</div>
		
		<br clear="all">
		
		<div style="float:left;padding-right:10px">
		Wife Maiden Name:<br>
		<input <?php echo $readonlyflag?> type="text" size="32" name="decedent_wife_maiden_name" value="<?php echo $decedent_wife_maiden_name?>"><br>

		Father's Full Name:<br>
		<input <?php echo $readonlyflag?> type="text" size="32" name="decedent_fathers_full_name" value="<?php echo $decedent_fathers_full_name?>"><br>

		Mother's Full Maiden Name:<br>
		<input <?php echo $readonlyflag?> type="text" size="32" name="decedent_mothers_maiden_name" value="<?php echo $decedent_fathers_full_name?>">
		</div>
		
		<br clear="all">
		
		<input <?php echo $readonlyflag?> type="checkbox" name="had_policy" <?php echo  $decedent_had_policy_selected ?> > Decedent had policy with 
		<input <?php echo $readonlyflag?> type="text" size="8" name="had_policy_with" value="<?php echo  $policy_with ?>">

		<br><br>
		<div style="float:left;padding-right:10px">		
		<div style="text-align:left;font-weight:bold">Birth</div>		
		Date:<br>
		<input <?php echo $readonlyflag?> type="text" size="10" name="decedent_dob" value="<?php echo $decedent_dob?>"><br>
		<div style="float:left;padding-right:10px">
		City:<br>
		<input <?php echo $readonlyflag?> type="text" size="25" name="decedent_birth_city" value="<?php echo $decedent_birth_city?>"><br>
		</div>
		<div style="float:left;padding-right:10px">
		State:<br>
		<input <?php echo $readonlyflag?> type="text" size="2" name="decedent_birth_state" value="<?php echo $decedent_birth_state?>"><br>
		</div>
		<br clear="all">
		Country:<br>
		<input <?php echo $readonlyflag?> type="text" size="15" name="decedent_birth_country" value="<?php echo $decedent_birth_country?>"><br>
		</div>
	
		<div style="float:left;padding-right:15px">
		<div style="text-align:left;font-weight:bold">Death</div>
		Date:<br>
		<input <?php echo $readonlyflag?> type="text" size="10" name="decedent_dod" value="<?php echo $decedent_dod?>"><br>
		Location:<br>
		<input <?php echo $readonlyflag?> type="text" size="35" name="decedent_death_location_name" value="<?php echo $decedent_death_location_name?>"><br>
		Address:<br>
		<input <?php echo $readonlyflag?> type="text" size="35" name="decedent_death_location_address" value="<?php echo $decedent_death_location_address?>"><br>
		<div style="float:left;padding-right:10px">
		City:<br>
		<input <?php echo $readonlyflag?> type="text" size="25" name="decedent_death_city" value="<?php echo $decedent_death_city?>"><br>
		</div>
		<div style="float:left;padding-right:10px">
		State:<br>
		<input <?php echo $readonlyflag?> type="text" size="2" name="decedent_death_state" value="<?php echo $decedent_death_state?>"><br>
		</div>
		<br clear="all">
		Country:<br>
		<input <?php echo $readonlyflag?> type="text" size="15" name="decedent_death_country" value="<?php echo $decedent_death_country?>"><br>
		</div>
		
		<br clear="all">
		<br>
		<div style="float:left;padding-right:15px">
		<div style="text-align:left;font-weight:bold">Education</div>
		Primary:<br>
		<input <?php echo $readonlyflag?> type="text" size="15" name="decedent_primary_education" value="<?php echo $decedent_primary_education?>"><br>
		Secondary:<br>
		<input <?php echo $readonlyflag?> type="text" size="15" name="decedent_secondary_education" value="<?php echo $decedent_secondary_education?>"><br>
		</div>
		
		<div style="float:left;padding-right:15px">
		<div style="text-align:left;font-weight:bold">Occupation</div>
		Primary Occupation:<br>
		<input <?php echo $readonlyflag?> type="text" size="15" name="decedent_occupation" value="<?php echo $decedent_occupation?>"><br>
		Business Category:<br>
		<input <?php echo $readonlyflag?> type="text" size="15" name="decedent_business" value="<?php echo $decedent_business?>"><br>
		Company Name:<br>
		<input <?php echo $readonlyflag?> type="text" size="15" name="decedent_company_name" value="<?php echo $decedent_company_name?>"><br>
		</div>
		
		<div style="float:left;padding-right:10px">
			<div style="text-align:left;font-weight:bold">Military Service</div>
			<input <?php echo $readonlyflag?> type="checkbox" name="decedent_is_veteran" <?php echo  $veteran_is_selected ?> > Decedent was Veteran<br>
			<div style="float:left;padding-right:5px">
				Branch of Service:<br>
				<input <?php echo $readonlyflag?> type="text" size="15" name="branch_of_service" value="<?php echo $branch_of_service?>"><br>
			</div>
			<div style="float:left;padding-right:5px">
				Serial Number:<br>
				<input <?php echo $readonlyflag?> type="text" size="15" name="military_serial_num" value="<?php echo $military_serial_num?>"><br>
			</div>		
			<br clear="all">
			<div style="float:left;padding-right:5px">
				Enlisted:<br>
				<input <?php echo $readonlyflag?> type="text" size="15" name="date_enlisted" value="<?php echo $date_enlisted?>"><br>
			</div>
			<div style="float:left;padding-right:5px">
				Discharged:<br>
				<input <?php echo $readonlyflag?> type="text" size="15" name="date_discharged" value="<?php echo $date_discharged?>"><br>
				<input <?php echo $readonlyflag?> type="checkbox" name="honorable_discharge" <?php echo  $decedent_honorable_discharge_selected ?>> Honorably Discharged<br>
				<input <?php echo $readonlyflag?> type="checkbox" name="discharge_papers_avail" <?php echo  $decedent_papers_available_selected ?>> Papers Available
			</div>
		</div>		
		<br clear="all">
		<br>
		<!-- contact info -->
		<div style="text-align:center;float:left;padding-right:5px">		
			<div style="text-align:center;font-weight:bold">Family Contacts</div>
			<div style="text-align:left;padding-right:5px">
				<span style="font-weight:bold">Primary</span><br>
				<div style="float:left;padding-right:2px">
				First Name:<br>
				<input <?php echo $readonlyflag?> type="text" size="10" name="contact_fname" value="<?php echo $contact_fname?>">
				</div>
				<div style="float:left;padding-right:2px">
				Middle Name:<br>
				<input <?php echo $readonlyflag?> type="text" size="10" name="contact_mname" value="<?php echo $contact_mname?>">
				</div>
				<div style="float:left;padding-right:2px">
				Last Name:<br>
				<input <?php echo $readonlyflag?> type="text" size="15" name="contact_lname" value="<?php echo $contact_lname?>">
				</div>
				<br clear="all">				
				Address:<br>
				<input <?php echo $readonlyflag?> type="text" size="25" name="contact_address" value="<?php echo $contact_address?>"><br>
				<div style="float:left;padding-right:2px">
				City:<br>
				<input <?php echo $readonlyflag?> type="text" size="20" name="contact_city" value="<?php echo $contact_city?>"><br>
				</div>
				<div style="float:left;padding-right:2px">
				State:<br>
				<input <?php echo $readonlyflag?> type="text" size="2" name="contact_state" value="<?php echo $contact_state?>"><br>
				</div>
				<div style="float:left;padding-right:2px">
				Zip:<br>
				<input <?php echo $readonlyflag?> type="text" size="10" name="contact_zip" value="<?php echo $contact_zip?>"><br>
				</div>
				<br clear="all">
				<div style="float:left;padding-right:2px">
				Phone:<br>
				<input <?php echo $readonlyflag?> type="text" size="16" name="contact_phone" value="<?php echo $contact_phone?>"><br>
				</div>
				<div style="float:left;padding-right:2px">
				Email:<br>
				<input <?php echo $readonlyflag?> type="text" size="30" name="contact_email" value="<?php echo $contact_email?>"><br>
				</div>
				
			</div>
			<br>
			<div style="text-align:left">
				<span style="font-weight:bold">Secondary</span><br>
				Name:<br>
				<input <?php echo $readonlyflag?> type="text" size="30" name="secondary_contact_fullname" value="<?php echo $secondary_contact_fullname?>">
				<br clear="all">
				
				Address:<br>
				<input <?php echo $readonlyflag?> type="text" size="25" name="secondary_contact_address" value="<?php echo $secondary_contact_address?>"><br>
				<div style="float:left;padding-right:2px">
				City:<br>
				<input <?php echo $readonlyflag?> type="text" size="20" name="secondary_contact_city" value="<?php echo $secondary_contact_city?>"><br>
				</div>
				<div style="float:left;padding-right:2px">
				State:<br>
				<input <?php echo $readonlyflag?> type="text" size="2" name="secondary_contact_state" value="<?php echo $secondary_contact_state?>"><br>
				</div>
				<div style="float:left;padding-right:2px">
				Zip:<br>
				<input <?php echo $readonlyflag?> type="text" size="10" name="secondary_contact_zip" value="<?php echo $secondary_contact_zip?>"><br>
				</div>
				<br clear="all">
				<div style="float:left;padding-right:2px">
				Phone:<br>
				<input <?php echo $readonlyflag?> type="text" size="16" name="secondary_contact_phone" value="<?php echo $secondary_contact_phone?>"><br>
				</div>
				<div style="float:left;padding-right:2px">
				Email:<br>
				<input <?php echo $readonlyflag?> type="text" size="30" name="secondary_contact_email" value="<?php echo $secondary_contact_email?>"><br>
				</div>
			</div>
		</div>
				
		<!-- service/cemetery/crematory info -->
		<div style="text-align:left;float:left">		
			<div style="text-align:center;font-weight:bold">Service Information</div><br>

			<div style="float:left;padding-right:2px">
			Date:<br>
			<input <?php echo $readonlyflag?> type="text" name="service_date" size="10" value="<?php echo  $service_date ?>">
			</div>
			<br>
			<div style="float:left;padding-right:2px">
			Time:<br>
			<input <?php echo $readonlyflag?> type="text" name="service_time" size="10" value="<?php echo  $service_time ?>">
			</div>
			<br clear="all">
			<strong>Church</strong><br>
			Name:<br>
			<input <?php echo $readonlyflag?> type="text" name="church" size="25" value="<?php echo  $church ?>"><br>
			Address:<br>
			<input <?php echo $readonlyflag?> type="text" name="church_street" size="25" value="<?php echo  $church_street ?>"><br>
			
			<div style="float:left;padding-right:2px">
				City, State, Zip:<br>
				<input <?php echo $readonlyflag?> type="text" name="church_citystatezip" size="35" value="<?php echo  $church_citystatezip ?>">
			</div>
			<br clear="all">
			<br>		
			<strong>Cemetery</strong><br>
			Name:<br>
			<input <?php echo $readonlyflag?> type="text" name="cemetery_name" size="25" value="<?php echo  $cemetery_name ?>"><br>
			Address:<br>
			<input type="text" name="cemetery_address" size="25" value="<?php echo  $cemetery_address ?>"><br>			
			<div style="float:left;padding-right:2px">
				City:<br>
				<input <?php echo $readonlyflag?> type="text" name="cemetery_city" size="15" value="<?php echo  $cemetery_city ?>">
			</div>
			<div style="float:left;padding-right:2px">
				State:<br>
				<input <?php echo $readonlyflag?> type="text" name="cemetery_state" size="2" value="<?php echo  $cemetery_state ?>">
			</div>
			<div style="float:left;padding-right:2px">
				Zip:<br>
				<input <?php echo $readonlyflag?> type="text" name="cemetery_zip" size="5" value="<?php echo  $cemetery_zip ?>">
			</div>
			<br clear="all">
			<br>		
			<strong>Crematorium</strong><br>
			Name:<br>
			<input <?php echo $readonlyflag?> type="text" name="crematory_name" size="25" value="<?php echo  $crematory_name ?>"><br>
			Address:<br>
			<input <?php echo $readonlyflag?> type="text" name="crematory_street" size="25" value="<?php echo  $crematory_street ?>"><br>			
			<div style="float:left;padding-right:2px">
				City:<br>
				<input <?php echo $readonlyflag?> type="text" name="crematory_city" size="15" value="<?php echo  $crematory_city ?>">
			</div>
			<div style="float:left;padding-right:2px">
				State:<br>
				<input <?php echo $readonlyflag?> type="text" name="crematory_state" size="2" value="<?php echo  $crematory_state ?>">
			</div>
			<div style="float:left;padding-right:2px">
				Zip:<br>
				<input <?php echo $readonlyflag?> type="text" name="crematory_zip" size="5" value="<?php echo  $crematory_zip ?>">
			</div>
			<br clear="all">
			<br>		
			
			<strong>Additional Service</strong><br>
			<div style="float:left;padding-right:2px">
			Date:<br>
			<input <?php echo $readonlyflag?> type="text" name="addnl_svc_date" size="10" value="<?php echo  $addnl_svc_date ?>">
			</div>			
			<div style="float:left;padding-right:2px">
			Time:<br>
			<input <?php echo $readonlyflag?> type="text" name="addnl_svc_time" size="10" value="<?php echo  $addnl_svc_time ?>">
			</div>
			<br clear="all">
			Type:<br>
			<input <?php echo $readonlyflag?> type="text" name="addnl_svc" size="25" value="<?php echo  $addnl_svc ?>"><br>
			Location:<br>
			<input <?php echo $readonlyflag?> type="text" name="addnl_svc_place" size="25" value="<?php echo  $addnl_svc_place ?>"><br>
			Address:<br>
			<input <?php echo $readonlyflag?> type="text" name="addnl_svc_street" size="25" value="<?php echo  $addnl_svc_street ?>"><br>			
			<div style="float:left;padding-right:2px">
				City:<br>
				<input <?php echo $readonlyflag?> type="text" name="addnl_svc_city" size="15" value="<?php echo  $addnl_svc_city ?>">
			</div>
			<div style="float:left;padding-right:2px">
				State:<br>
				<input <?php echo $readonlyflag?> type="text" name="addnl_svc_state" size="2" value="<?php echo  $addnl_svc_state ?>">
			</div>
			<div style="float:left;padding-right:2px">
				Zip:<br>
				<input <?php echo $readonlyflag?> type="text" name="addnl_svc_zip" size="5" value="<?php echo  $addnl_svc_zip ?>">
			</div>
			<br clear="all">
			</div>
		</div>
		<br clear="all">
		
<?php
if($this->editable)
	echo "<br><div style=\"width:100%;text-align:right\"><input type=\"submit\" value=\" Apply Changes \"></div>";
	echo "</form>";
 ?>
 		<hr>
		<!-- contract info -->
		<div style="text-align:center;width:100%">		
			<div style="text-align:left;font-weight:bold">Arrangement Information</div>
				<div style="text-align:left;float:left;padding-right:25px">
					<strong>Arranger/Home</strong><br>
					<?php echo  $fdms_funeral_dir_name ?><br>
					<?php echo  $fdms_funeral_home_name ?><br>
					<?php echo  $fdms_funeral_home_address ?><br>
					<?php echo  $fdms_funeral_home_city_state_zip ?>
				</div>
				<div style="text-align:left;float:left;padding-right:5px">
					<strong>Choices</strong><br>
					<?php
					echo "Choice: <strong>$choice</strong><br>";
					list($id,$tribute_name) = explode(":", $tribute);
					echo "<strong>$tribute_name</strong><br>";
					if($choice == "BURIAL") echo "Casket: <strong>$casket</strong><br>";
					if($choice == "CREMATION") echo "Urn: <strong>$urn</strong><br>";
					echo "Vault: <strong>$vault</strong><br>";
					?>
				</div>
				<br clear="all">
				<br>
				<div style="float:left;text-align:left;padding-right:25px">
					<strong>Floral</strong><br>
				 <?php
				 	if($florist_name == "Select a florist") $florist_name = "None selected";
				 	
				 	$florist_name = stripslashes($florist_name);
				 	$florist_name = str_replace(":", "", $florist_name);
				 	
				 	echo "<table 
				 		cellpadding=\"6\" 
				 		cellspacing=\"4\" 
				 		width=\"100%\" 
				 		class=\"summarytable\">\n";
				 		
				 	echo "<tr class=\"row0\"><td>Florist:</td><td>$florist_name</td></tr>";
				 	echo "<tr class=\"row1\"><td>Notes:</td><td><pre>$floral_notes</pre></td></tr>";
				 	echo "<tr class=\"row0\"><td colspan=2>Arrangements:</td><td>";
				 	$rowclass = 1;
				 	$arrangement_total = 0;
				 	if($arrangements != null)
				 	{
				 		echo "<table border=0>";
					 	foreach( $arrangements as $arrangement)
					 	{
					 		echo "<tr class=\"row" . $rowclass . "\">";
					 		echo "<td>".$arrangement['name']."</td>";
					 		echo "<td>".$arrangement['price']."</td>";
					 		echo "</tr>\n";
					 		$rowclass = 1 - $rowclass;
					 		$arrangement_total += $arrangement['price'];
					 	}
					 	echo "<tr><td>Total: \$$arrangement_total</td></tr>";
					 	echo "</table>";
				 	}
				 	else
				 	{
				 		echo "<tr class=\"row" . $rowclass . "\">";
				 		echo "<td colspan=2>No floral arrangements selected</tr>\n";
				 	}
				 	echo "</td></tr>";
				 	echo "<tr class=\"row$rowclass\"><td>Total:</td><td>\$$arrangement_total</td></tr>";
				 	echo "</table>\n";
				  ?>
				</div>
				<div style="float:left;text-align:left;padding-right:2px">
					<strong>Catering</strong><br>
					<?php
							if($caterer_name == "Choose a caterer")
							{
								$caterer_name = "None chosen";
								$menu = "None chosen";
								$menu_price = "Unknown";
								$catering_total = 0;
							}
							
					 		echo "<table cellpadding=\"6\" cellspacing=\"4\" style=\"width:100%\" class=\"summarytable\">\n";
					 		echo "<tr class=\"row0\"><td>Caterer:</td><td>$caterer_name</td></tr>";
					 		echo "<tr class=\"row1\"><td>Menu:</td><td>$menu</td></tr>";
					 		echo "<tr class=\"row0\"><td>Price:</td><td>$menu_price</td></tr>";
					 		echo "<tr class=\"row1\"><td>Headcount:</td><td>$headcount</td></tr>";
					 		echo "<tr class=\"row0\"><td>Total:</td><td>\$$catering_total</td></tr>";
					 		echo "<tr class=\"row1\"><td>Notes:</td><td>$catering_notes</td></tr>";
					 		echo "</table>\n";
					
					 ?>
				</div>
		</div>
		<br clear="all">

</div>
<br>
<br><br>
<div id="section3">
	<h1>Services:</h1>
	<?php
	$servicesTotal = 0.0;
	if($this->caseServicesItems)
	{
 		// loop thru $this->caseServicesItems and write them out in a table
 		$rowclass = 0;
 		echo "<table cellpadding=\"6\" cellspacing=\"4\" style=\"width:100%\" class=\"summarytable\">\n";
 		echo "<tr><th>ID</th><th>CL#</th><th>Description</th><th>Price</th><th>Src</th></tr>\n";
 		foreach( $this->caseServicesItems as $item )
 		{
 			echo "<tr class=\"row" . $rowclass . "\">";
 			echo "<td>".$item['price_list_id']."</td>";
 			echo "<td>".$item['line_number']."</td>";
 			echo "<td>".$item['item_description']."</td>";
 			echo "<td>$".$item['item_amount']."</td>";
 			echo "<td>{$item['source']}</td>";
 			echo "</tr>\n";
 			$rowclass = 1 - $rowclass;
 			$servicesTotal += $item['item_amount'];
 		}
 		echo "<tr class=\"row0\"><td colspan=3>Total</td><td>\$$servicesTotal</td></tr>";
 		echo "</table>\n";
	}
	else
	{
 		echo "<em>No services selected for this case</em><br>";
	}
	// services
	?>
</div>
<br><br>
<div id="section4">
	<h1>Cash Advances:</h1>
	<?php
	if($this->caseCashAdvanceItems)
	{
		$cashAdvanceTotal = 0.0;
 		// loop thru $this->caseServicesItems and write them out in a table
 		$rowclass = 0;
 		echo "<table cellpadding=\"6\" cellspacing=\"4\" style=\"width:100%\" class=\"summarytable\">\n";
 		echo "<tr><th>ID</th><th>CL#</th><th>Description</th><th>Qty</th><th>Price</th><th>Total</th><th>Src</th></tr>\n";
 		foreach( $this->caseCashAdvanceItems as $item )
 		{
 			echo "<tr class=\"row" . $rowclass . "\">";
 			echo "<td>".$item['price_list_id']."</td>";
 			echo "<td>".$item['line_number']."</td>";
 			echo "<td>".$item['item_description']."</td>";
 			echo "<td>".$item['qty']."</td>";
 			echo "<td>\$".$item['item_amount']."</td>";
 			echo "<td>\$".$item['total']."</td>";
 			echo "<td>{$item['source']}</td>";
 			echo "</tr>\n";
 			$rowclass = 1 - $rowclass;
 			$cashAdvanceTotal += $item['total'];
 		}
 		echo "<tr class=\"row0\"><td colspan=5>Total</td><td>\$$cashAdvanceTotal</td></tr>";
 		echo "</table>\n";

		$things_to_bring = stripslashes($this->caseInfo['things_to_bring']); 		
 		echo "<table cellpadding=\"6\" cellspacing=\"4\" style=\"width:100%\" class=\"summarytable\">\n";
 		echo "<tr class=\"row0\"><td>Family Reminders</td><td colspan=4><pre>$things_to_bring</pre></td></tr>";
 		echo "</table>\n";
	}
	else
	{
 		echo "<em>No cash advances selected for this case</em><br>";
	}
	?>
</div>
<br><br>
<div id="section5">
	<h1>Merchandise:</h1>
	<?php
	if($this->caseMerchItems)
	{
		$merchandiseTotal = 0.0;
 		$rowclass = 0;	
 		echo "<table cellpadding=\"6\" cellspacing=\"4\" style=\"width:100%\" class=\"summarytable\">\n";
 		echo "<tr><th>ID</th><th>CL#</th><th>Source</th><th>Description</th><th>Qty</th><th>Price</th><th>Total</th><th>Src</th></tr>\n";
 		foreach( $this->caseMerchItems as $item )
 		{
 			echo "<tr class=\"row" . $rowclass . "\">";
 			echo "<td>".$item['price_list_id']."</td>";
 			echo "<td>".$item['line_number']."</td>";
 			echo "<td>".$item['source']."</td>";
 			echo "<td>".$item['item_description']."</td>";
 			echo "<td>".$item['qty']."</td>";
 			echo "<td>\$".$item['item_amount']."</td>";
 			echo "<td>\$".$item['total']."</td>";
 			echo "<td>{$item['source']}</td>";
 			echo "</tr>\n";
 			$rowclass = 1 - $rowclass;
 			$merchandiseTotal += $item['total'];
 		}
 		echo "<tr class=\"row0\"><td colspan=6>Total</td><td>\$$merchandiseTotal</td></tr>";
 		echo "</table>\n";
	}
	else
	{
 		echo "<em>No merchandise selected for this case</em><br>";
	}
	?>
</div>
</div>